package com.miao.teacher.adapter;
import java.util.ArrayList;
import java.util.List;

import com.miao.teacher.ui.PullFragment;
import com.miao.teacher.ui.R;
import com.miao.teacher.ui.RateFragment;
import com.miao.teacher.ui.ReviseFragment;
import com.miao.teacher.ui.SummaryFragment;
import com.miao.teacher.ui.UnfinishedFragment;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

public class MyRevisePageAdapter  extends FragmentPagerAdapter{

	private Context mContext;
	
	public List<Fragment> fragment=null;
	public MyRevisePageAdapter(Context context,FragmentManager fm) {
		super(fm);
		// TODO Auto-generated constructor stub
		mContext=context;
		fragment=new ArrayList<Fragment>();
		fragment.add(RateFragment.newInstance());
		fragment.add(ReviseFragment.newInstance());
		fragment.add(SummaryFragment.newInstance());
	}

	@Override
	public Fragment getItem(int arg0) {
		// TODO Auto-generated method stub
		return fragment.get(arg0);
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return mContext.getResources().getStringArray(R.array.reviseTab).length;
	}

	@Override
	public CharSequence getPageTitle(int position) {
		// TODO Auto-generated method stub
		return mContext.getResources().getStringArray(R.array.reviseTab)[position];
	}

}
